package org.ycx.upms.dao.model;

import java.io.Serializable;
import org.ycx.common.annotation.FormDesc;

@FormDesc(pk="gid")
public class SecGroup implements Serializable {
    /** 主键 */
    @FormDesc(name="主键",maxLength=10,type=1)
    private Integer gid;

    /** 用户组名称 */
    @FormDesc(name="用户组名称",maxLength=100,type=0)
    private String groupName;

    /** 用户组描述 */
    @FormDesc(name="用户组描述",maxLength=200,type=0)
    private String gDesc;

    /** 用户组人数 */
    @FormDesc(name="用户组人数",maxLength=10,type=1)
    private Integer gCount;

    private static final long serialVersionUID = 1L;

    public Integer getGid() {
        return gid;
    }

    public void setGid(Integer gid) {
        this.gid = gid;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getgDesc() {
        return gDesc;
    }

    public void setgDesc(String gDesc) {
        this.gDesc = gDesc;
    }

    public Integer getgCount() {
        return gCount;
    }

    public void setgCount(Integer gCount) {
        this.gCount = gCount;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", gid=").append(gid);
        sb.append(", groupName=").append(groupName);
        sb.append(", gDesc=").append(gDesc);
        sb.append(", gCount=").append(gCount);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SecGroup other = (SecGroup) that;
        return (this.getGid() == null ? other.getGid() == null : this.getGid().equals(other.getGid()))
            && (this.getGroupName() == null ? other.getGroupName() == null : this.getGroupName().equals(other.getGroupName()))
            && (this.getgDesc() == null ? other.getgDesc() == null : this.getgDesc().equals(other.getgDesc()))
            && (this.getgCount() == null ? other.getgCount() == null : this.getgCount().equals(other.getgCount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getGid() == null) ? 0 : getGid().hashCode());
        result = prime * result + ((getGroupName() == null) ? 0 : getGroupName().hashCode());
        result = prime * result + ((getgDesc() == null) ? 0 : getgDesc().hashCode());
        result = prime * result + ((getgCount() == null) ? 0 : getgCount().hashCode());
        return result;
    }
}